/* Shared appearance controls. These remain loaded across AJAX page changes. */
:root {
  --hangout-control: #e4e6eb;
  --hangout-hover: #d8dadf;
}
#tag_settings .modal-dialog { width: min(600px, calc(100% - 24px)); margin: 28px auto; }
#tag_settings .modal-content { border: 1px solid var(--claude-line, #e4e6eb); border-radius: 20px; box-shadow: 0 24px 80px rgba(0,0,0,.2); overflow: hidden; }
#tag_settings .modal-header { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--claude-line, #e4e6eb); }
#tag_settings .modal-title { font-size: 22px; font-weight: 700; }
#tag_settings .tag_theme_opts_close { display: inline-flex; align-items: center; justify-content: center; float: none; width: 36px; height: 36px; border: 0; background: var(--hangout-control); color: inherit; box-shadow: none; }
#tag_settings .wondertag_form .modal-body { max-height: calc(100dvh - 160px); padding: 24px; margin: 0; overflow-y: auto; overscroll-behavior: contain; }
#tag_settings .tag_theme_opts_hdr { padding: 20px; margin: 0 0 24px; border: 1px solid var(--claude-line, #e4e6eb); border-radius: 16px; background: var(--claude-input, #f0f2f5); }
#tag_settings .tag_theme_opts_hdr img { width: 56px; height: 56px; object-fit: contain; }
#tag_settings .tag_theme_opts_hdr h6 { font-size: 20px; font-weight: 700; margin: 0 0 6px; }
#tag_settings .tag_theme_opts_hdr p { margin: 0; color: var(--claude-muted, #65676b); font-size: 13px; }
#tag_settings .badge { background: var(--claude-blue-soft, #e7f3ff); color: var(--claude-blue, #0866ff); border-radius: 6px; padding: 5px 8px; vertical-align: middle; font-size: 12px; }
#tag_settings .tag_theme_opts_space { height: 1px; background: var(--claude-line, #e4e6eb); margin: 24px 0; }
#tag_settings .tag_theme_opts_p { margin: 0 0 16px; font-size: 12px; color: var(--claude-muted, #65676b); font-weight: 700; letter-spacing: 1.2px; }
#tag_settings .tag_theme_opts_check label { gap: 16px; min-height: 48px; font-size: 15px; line-height: 1.45; cursor: pointer; }
#tag_settings .tag_theme_opts_check input[type=checkbox] { display: block; position: absolute; width: 1px; height: 1px; opacity: 0; }
#tag_settings .tag_theme_opts_check span { flex-shrink: 0; background: var(--hangout-control); }
#tag_settings .tag_theme_opts_check input:checked + label span { background: #0866ff; }
#tag_settings .tag_theme_opts_check input:focus-visible + label span { outline: 3px solid #0866ff; outline-offset: 3px; }
#tag_settings hr { margin: 10px 0; border-color: var(--claude-line, #e4e6eb); }

/* Fit every reaction inside the tray, including narrow phones and replies. */
.reactions-box[style*="display: block"], .reactions-box[style*="display: flex"] {
  display: flex !important; align-items: center; flex-wrap: nowrap;
  box-sizing: border-box; max-width: calc(100vw - 24px);
  width: max-content; gap: 2px; padding: 6px; overflow: visible;
}
.reactions-box .reaction { display: flex; align-items: center; justify-content: center; flex: 0 1 48px; min-width: 0; }
.reactions-box .reaction::before { max-width: 100%; max-height: 100%; background-position: center; }
.reactions-box .reaction img { max-width: 100%; max-height: 100%; }
@media (max-width: 600px) {
  .reactions-box[style*="display: block"], .reactions-box[style*="display: flex"] { width: min(354px, calc(100vw - 24px)); }
  .reactions-box .reaction { flex: 1 1 0; width: auto; height: 40px; }
  .reactions-box .reaction::before { width: 38px; height: 38px; }
  .reactions-box .reaction:hover { transform: translateY(-3px); }
  #tag_settings .modal-dialog { margin: 12px auto; }
  #tag_settings .modal-header, #tag_settings .wondertag_form .modal-body { padding: 18px; }
}
@media (max-width: 768px) {
  .tag_navbar_top .tag_header > .search-container:not(.open):not(.show):not(:focus-within) .search-input {
    color: transparent !important; font-size: 0 !important; caret-color: transparent;
  }
  .tag_navbar_top .tag_header > .search-container:not(.open):not(.show):not(:focus-within) .search-input::placeholder { color: transparent !important; }
}
